package org.example;
import java.io.*;
public class YootkDemo3 {
    public static void main(String[] args) throws Exception {
        File file = new File("F:" + File.separator + "mutant" + File.separator +
                "vip" + File.separator + "yootk.txt");

        if (!file.getParentFile().exists()) {
            file.getParentFile().mkdirs();
        }
        try (Writer out = new FileWriter(file)) {
            out.write("沐言科技：www.yootk.com\n");
            out.append("李兴华高薪就业编程训练营：edu.yootk.com");
        }
        // 输出写入的文件路径
        System.out.println("文件已写入: " + file.getAbsolutePath());
    }
}
